BIN=processpool
CC=g++
FLAGS=-c -Wall -std=c++11 #Wall -报警提示
LDFLAGS=-o
# SRC=$(shell ls *.cc)
SRC=$(wildcard *.cc) #返回当前目录下的所有.cc文件
OBJ=$(SRC:.cc=.o)

$(BIN):$(OBJ)
		$(CC) $(LDFLAGS) $@ $^
%.o:%.cc
		$(cc) $(FLAGS) $<

.PHONY:clean
clean:
		rm -rf $(BIN) $(OBJ)
.PHONY:test
test:
		@echo $(SRC)
		@echo $(OBJ)